﻿using System;
using Microsoft.SharePoint;

namespace com.sogeti.certif.masterpage.Branding
{
    public class WebEventReceiver
        : SPWebEventReceiver
    {
        public override void WebProvisioned(SPWebEventProperties properties)
        {
            SPWeb web = properties.Web;
            SPWeb rootSite = web.Site.RootWeb;
            web.MasterUrl = rootSite.MasterUrl;
            web.CustomMasterUrl = rootSite.CustomMasterUrl;
            web.Update();
        }
    }
}
